//
// CFunCallbackStream.hpp for CFunCallbackStream in /home/mambou_j//babel-2014
// 
// Made by jacquesquentin mamboumouafo
// Login   <mambou_j@epitech.net>
// 
// Started on  Fri May 11 00:29:06 2012 jacquesquentin mamboumouafo
// Last update Fri May 11 00:51:18 2012 jacquesquentin mamboumouafo
//


#ifndef	_CFUNCALLBACKSTREAM_HPP__
#define	_CFUNCALLBACKSTREAM_HPP__

#include	"portaudio.h"
#include	"CallbackStream.hpp"

// Forward declaration(s)
namespace	portaudio
{
  class	StreamParameters;
}

// Declaration(s):
namespace	portaudio
{

  /////
  /// @brief Callback stream using a free function with C linkage. It's
  /// important that the function
  /// the passed function pointer points to is declared ''extern "C"''
  /////
  class	CFunCallbackStream	:	public	CallbackStream
  {
  public:
    CFunCallbackStream();
    CFunCallbackStream(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData);
    ~CFunCallbackStream();

    void	open(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData);

  private:
    CFunCallbackStream(const CFunCallbackStream &);
    CFunCallbackStream &operator=(const CFunCallback *funPtr, void *userData);
  };
}

#endif
